package com.demo8.hutool.core.ai;

import cn.hutool.ai.AIUtil;
import cn.hutool.ai.ModelName;
import cn.hutool.ai.core.AIConfigBuilder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/hutool/ai")
@RestController
public class HutoolAiController {
    @RequestMapping("/singleChatDeepSeek")
    public String singleChatDeepSeek(String question) {

        return AIUtil.chat(new AIConfigBuilder(ModelName.DEEPSEEK.getValue()).setApiKey("sk-359c52f00d1145a28c0184a8651d8e1c").build(),question);
    }
    @RequestMapping("/singleChatDouBao")
    public String singleChatDouBao(String question) {

        return AIUtil.chat(new AIConfigBuilder(ModelName.DEEPSEEK.getValue()).setApiKey("sk-359c52f00d1145a28c0184a8651d8e1c").build(),question);
    }
}
